<template>
  <div v-if="userInfo.authority != 'qrcodepay' && userInfo.authority != 'qrcodePayCw'" class="container">
    <el-row :gutter="20">
<!--      <el-col :xs="24" :sm="24" :md="12" :lg="12" :xl="4">-->
<!--        <div class="card-panel">-->
<!--          <div class="box-enroll">-->
<!--            <div class="box-enroll-img">-->
<!--              <div class="box-enroll-img-img" ></div>-->
<!--&lt;!&ndash;              <img  src="../../assets/icons/yonghu.png">&ndash;&gt;-->
<!--            </div>-->
<!--            <div class="box-enroll-text">-->
<!--              <div class="box-enroll-text-text">今天注册用户</div>-->
<!--              <div class="box-enroll-text-text much"><span>{{ nowData.registerUserCount }}</span></div>-->
<!--            </div>-->
<!--          </div>-->
<!--        </div>-->
<!--      </el-col>-->
<!--      <el-col :xs="24" :sm="24" :md="12" :lg="12" :xl="4">-->
<!--        <div class="card-panel">-->
<!--          <div class="box-enroll">-->
<!--            <div class="box-enroll-img">-->
<!--              <div class="box-enroll-img-img" ></div>-->
<!--            </div>-->
<!--            <div class="box-enroll-text">-->
<!--              <div class="box-enroll-text-text">昨天注册用户</div>-->
<!--              <div class="box-enroll-text-text much">{{ yesterdayData.registerUserCount }}</div>-->
<!--            </div>-->
<!--          </div>-->
<!--        </div>-->
<!--      </el-col>-->
<!--      <el-col :xs="24" :sm="24" :md="12" :lg="12" :xl="4">-->
<!--        <div class="card-panel">-->
<!--          <div class="box-enroll">-->
<!--            <div class="box-enroll-img">-->
<!--              <div class="box-enroll-img-img" ></div>-->
<!--              &lt;!&ndash;              <img  src="../../assets/icons/yonghu.png">&ndash;&gt;-->
<!--            </div>-->
<!--            <div class="box-enroll-text">-->
<!--              <div class="box-enroll-text-text">今天创角数</div>-->
<!--              <div class="box-enroll-text-text much"><span>{{ nowData.todayUserRoleAccount }}</span></div>-->
<!--            </div>-->
<!--          </div>-->
<!--        </div>-->
<!--      </el-col>-->
<!--      <el-col :xs="24" :sm="24" :md="12" :lg="12" :xl="4">-->
<!--        <div class="card-panel">-->
<!--          <div class="box-enroll">-->
<!--            <div class="box-enroll-img">-->
<!--              <div class="box-enroll-img-img" ></div>-->
<!--              &lt;!&ndash;              <img  src="../../assets/icons/yonghu.png">&ndash;&gt;-->
<!--            </div>-->
<!--            <div class="box-enroll-text">-->
<!--              <div class="box-enroll-text-text">昨日创角数</div>-->
<!--              <div class="box-enroll-text-text much"><span>{{ yesterdayData.yesterdayUserRoleAccount }}</span></div>-->
<!--            </div>-->
<!--          </div>-->
<!--        </div>-->
<!--      </el-col>-->
<!--      <el-col :xs="24" :sm="24" :md="12" :lg="12" :xl="4">-->
<!--        <div class="card-panel">-->
<!--          <div class="box-enroll">-->
<!--            <div class="box-enroll-imgtwo">-->
<!--              <div class="box-enroll-imgtwo-img" ></div>-->
<!--            </div>-->
<!--            <div class="box-enroll-text">-->
<!--              <div class="box-enroll-text-text">今天充值金额</div>-->
<!--              <div class="box-enroll-text-text much">{{ nowData.totalCount / 100 }}</div>-->
<!--            </div>-->

<!--          </div>-->
<!--        </div>-->
<!--      </el-col>-->
<!--      <el-col :xs="24" :sm="24" :md="12" :lg="12" :xl="4">-->
<!--        <div class="card-panel">-->
<!--          <div class="box-enroll">-->
<!--            <div class="box-enroll-imgtwo">-->
<!--              <div class="box-enroll-imgtwo-img" ></div>-->
<!--            </div>-->
<!--            <div class="box-enroll-text">-->
<!--              <div class="box-enroll-text-text">昨天充值金额</div>-->
<!--              <div class="box-enroll-text-text much">{{ yesterdayData.totalCount / 100 }}</div>-->
<!--            </div>-->
<!--          </div>-->
<!--        </div>-->
<!--      </el-col>-->
      <el-col :xs="24" :sm="24" :md="8" :lg="8" :xl="6">
        <div class="card-panel">
          <div style="display: flex; flex-direction: column;justify-content: space-between;height: 156px">
            <div style="font-size: 16px;font-family: Source Han Sans CN;font-weight: 500;color: #666666;">今日登录用户</div>
            <div style="font-size: 28px;font-family: Source Han Sans CN;font-weight: 500;color: #000000;">{{ nowData.loginAccount }}</div>
            <div >
              <span style="font-size: 14px;font-family: Source Han Sans CN;font-weight: 400;color: #666666;">昨日登录用户</span>
              <span style="font-size: 14px;font-family: Source Han Sans CN;font-weight: 400;color: #666666;margin-left: 20px">{{ yesterdayData.yesterdayLoginAccount  }}</span>
              <span style="margin-left: 40px">
                <img style="height: 10px;width: 10px" v-if="nowData.loginAccount<yesterdayData.yesterdayLoginAccount" src="https://yulonghuyu.oss-cn-hangzhou.aliyuncs.com/app-web/xitong/%E7%9F%A9%E5%BD%A2%20548%20%E6%8B%B7%E8%B4%9D%202%402x.png">
                <img style="height: 10px;width: 10px" v-else src="https://yulonghuyu.oss-cn-hangzhou.aliyuncs.com/app-web/xitong/%E7%9F%A9%E5%BD%A2%20548%402x.png">
                <span v-if="nowData.loginAccount>=yesterdayData.yesterdayLoginAccount&&yesterdayData.yesterdayLoginAccount!=0" style="color: #00a680;margin-left: 10px">{{ ((nowData.loginAccount - yesterdayData.yesterdayLoginAccount) /yesterdayData.yesterdayLoginAccount *100).toFixed(2) }}%</span>
                <span v-else-if="nowData.loginAccount<yesterdayData.yesterdayLoginAccount&&yesterdayData.yesterdayLoginAccount!=0" style="color: #FF464C;margin-left: 10px">{{ ((nowData.loginAccount - yesterdayData.yesterdayLoginAccount) /yesterdayData.yesterdayLoginAccount *100).toFixed(2) }}%</span>
                <span v-else-if="yesterdayData.yesterdayLoginAccount==0&&nowData.loginAccount==0" style="color: #00a680;margin-left: 10px">0%</span>
                <span v-else style="color: #00a680;margin-left: 10px">100%</span>
              </span>
            </div>
          </div>
          <div style="position:absolute;width: 100%; text-align: right;padding-bottom: 50px;">
            <img src="https://yulonghuyu.oss-cn-hangzhou.aliyuncs.com/app-web/xitong/%E4%BB%8A%E6%97%A5%E6%B3%A8%E5%86%8C%E7%94%A8%E6%88%B7%402x.png"
                 style="width: 200px;height: 140px; margin-right: 50px">
          </div>
        </div>
      </el-col>
      <el-col :xs="24" :sm="24" :md="8" :lg="8" :xl="6">
        <div class="card-panel">
          <div style="display: flex; flex-direction: column;justify-content: space-between;height: 156px">
            <div style="font-size: 16px;font-family: Source Han Sans CN;font-weight: 500;color: #666666;">今日充值总额</div>
            <div style="font-size: 28px;font-family: Source Han Sans CN;font-weight: 500;color: #000000;">{{ nowData.totalCount / 100 }}</div>
            <div >
              <span style="font-size: 14px;font-family: Source Han Sans CN;font-weight: 400;color: #666666;">昨日充值</span>
              <span style="font-size: 14px;font-family: Source Han Sans CN;font-weight: 400;color: #666666;margin-left: 20px">{{ yesterdayData.totalCount / 100 }}</span>
              <span style="margin-left: 40px">
                <img style="height: 10px;width: 10px" v-if="nowData.totalCount<yesterdayData.totalCount" src="https://yulonghuyu.oss-cn-hangzhou.aliyuncs.com/app-web/xitong/%E7%9F%A9%E5%BD%A2%20548%20%E6%8B%B7%E8%B4%9D%202%402x.png">
                <img style="height: 10px;width: 10px" v-else src="https://yulonghuyu.oss-cn-hangzhou.aliyuncs.com/app-web/xitong/%E7%9F%A9%E5%BD%A2%20548%402x.png">
                <span v-if="nowData.totalCount>=yesterdayData.totalCount&&yesterdayData.totalCount!=0" style="color: #00a680;margin-left: 10px">{{ ((nowData.totalCount - yesterdayData.totalCount) /yesterdayData.totalCount*100).toFixed(2)  }}%</span>
                <span v-else-if="nowData.totalCount<yesterdayData.totalCount&&yesterdayData.totalCount!=0" style="color: #FF464C;margin-left: 10px">{{ ((nowData.totalCount - yesterdayData.totalCount) /yesterdayData.totalCount*100).toFixed(2)  }}%</span>
                <span v-else-if="yesterdayData.totalCount==0&&nowData.totalCount==0" style="color: #00a680;margin-left: 10px">0%</span>
                <span v-else style="color: #00a680;margin-left: 10px">100%</span>
              </span>
            </div>
          </div>
          <div style="position:absolute;width: 100%; text-align: right;padding-bottom: 50px;">
            <img src="https://yulonghuyu.oss-cn-hangzhou.aliyuncs.com/app-web/xitong/%E4%BB%8A%E6%97%A5%E5%85%85%E5%80%BC%E6%80%BB%E9%A2%9D%402x.png"
                 style="width: 200px;height: 140px;margin-right: 50px">
          </div>
        </div>
      </el-col>
      <el-col :xs="24" :sm="24" :md="8" :lg="8" :xl="6">
        <div class="card-panel">
          <div style="display: flex; flex-direction: column;justify-content: space-between;height: 156px">
            <div style="font-size: 16px;font-family: Source Han Sans CN;font-weight: 500;color: #666666;">今日注册用户</div>
            <div style="font-size: 28px;font-family: Source Han Sans CN;font-weight: 500;color: #000000;">{{ nowData.registerUserCount }}</div>
            <div >
              <span style="font-size: 14px;font-family: Source Han Sans CN;font-weight: 400;color: #666666;">昨日注册用户</span>
              <span style="font-size: 14px;font-family: Source Han Sans CN;font-weight: 400;color: #666666;margin-left: 20px">{{ yesterdayData.registerUserCount  }}</span>
              <span style="margin-left: 40px">
                <img style="height: 10px;width: 10px" v-if="nowData.registerUserCount<yesterdayData.registerUserCount" src="https://yulonghuyu.oss-cn-hangzhou.aliyuncs.com/app-web/xitong/%E7%9F%A9%E5%BD%A2%20548%20%E6%8B%B7%E8%B4%9D%202%402x.png">
                <img style="height: 10px;width: 10px" v-else src="https://yulonghuyu.oss-cn-hangzhou.aliyuncs.com/app-web/xitong/%E7%9F%A9%E5%BD%A2%20548%402x.png">
                <span v-if="nowData.registerUserCount>=yesterdayData.registerUserCount&&yesterdayData.registerUserCount!=0" style="color: #00a680;margin-left: 10px">{{ ((nowData.registerUserCount - yesterdayData.registerUserCount) /yesterdayData.registerUserCount *100).toFixed(2) }}%</span>
                <span v-else-if="nowData.registerUserCount<yesterdayData.registerUserCount&&yesterdayData.registerUserCount!=0" style="color: #FF464C;margin-left: 10px">{{ ((nowData.registerUserCount - yesterdayData.registerUserCount) /yesterdayData.registerUserCount *100).toFixed(2) }}%</span>
                <span v-else-if="yesterdayData.registerUserCount==0&&nowData.registerUserCount==0" style="color: #00a680;margin-left: 10px">0%</span>
                <span v-else style="color: #00a680;margin-left: 10px">100%</span>
              </span>
            </div>
          </div>
          <div style="position:absolute;width: 100%; text-align: right;padding-bottom: 50px;">
            <img src="https://yulonghuyu.oss-cn-hangzhou.aliyuncs.com/app-web/xitong/%E4%BB%8A%E6%97%A5%E6%B3%A8%E5%86%8C%E7%94%A8%E6%88%B7%402x.png"
                 style="width: 200px;height: 140px; margin-right: 50px">
          </div>

        </div>
      </el-col>
      <el-col :xs="24" :sm="24" :md="8" :lg="8" :xl="6">
        <div class="card-panel">
          <div style="display: flex; flex-direction: column;justify-content: space-between;height: 156px">
            <div style="font-size: 16px;font-family: Source Han Sans CN;font-weight: 500;color: #666666;">今日创角数</div>
            <div style="font-size: 28px;font-family: Source Han Sans CN;font-weight: 500;color: #000000;">{{ nowData.todayUserRoleAccount  }}</div>
            <div >
              <span style="font-size: 14px;font-family: Source Han Sans CN;font-weight: 400;color: #666666;">昨日创角数</span>
              <span style="font-size: 14px;font-family: Source Han Sans CN;font-weight: 400;color: #666666;margin-left: 20px">{{ yesterdayData.yesterdayUserRoleAccount  }}</span>
              <span style="margin-left: 40px">
                <img style="height: 10px;width: 10px" v-if="nowData.todayUserRoleAccount<yesterdayData.yesterdayUserRoleAccount" src="https://yulonghuyu.oss-cn-hangzhou.aliyuncs.com/app-web/xitong/%E7%9F%A9%E5%BD%A2%20548%20%E6%8B%B7%E8%B4%9D%202%402x.png">
                <img style="height: 10px;width: 10px" v-else src="https://yulonghuyu.oss-cn-hangzhou.aliyuncs.com/app-web/xitong/%E7%9F%A9%E5%BD%A2%20548%402x.png">
                <span v-if="nowData.todayUserRoleAccount>=yesterdayData.yesterdayUserRoleAccount&&yesterdayData.yesterdayUserRoleAccount!=0" style="color: #00a680;margin-left: 10px">{{ ((nowData.todayUserRoleAccount - yesterdayData.yesterdayUserRoleAccount) /yesterdayData.yesterdayUserRoleAccount*100 ).toFixed(2) }}%</span>
                <span v-else-if="nowData.todayUserRoleAccount<yesterdayData.yesterdayUserRoleAccount&&yesterdayData.yesterdayUserRoleAccount!=0" style="color: #FF464C;margin-left: 10px">{{ ((nowData.todayUserRoleAccount - yesterdayData.yesterdayUserRoleAccount) /yesterdayData.yesterdayUserRoleAccount*100 ).toFixed(2) }}%</span>
                <span v-else-if="yesterdayData.yesterdayUserRoleAccount==0&&nowData.todayUserRoleAccount==0" style="color: #00a680;margin-left: 10px">0%</span>
                <span v-else style="color: #00a680;margin-left: 10px">100%</span>
              </span>
            </div>
          </div>
          <div style="position:absolute;width: 100%; text-align: right;padding-bottom: 50px;">
            <img src="https://yulonghuyu.oss-cn-hangzhou.aliyuncs.com/app-web/xitong/%E4%BB%8A%E6%97%A5%E5%88%9B%E8%A7%92%E6%95%B0%402x.png"
                 style="width: 200px;height: 140px; margin-right: 50px">
          </div>
        </div>
      </el-col>
    </el-row>
    <el-dialog
      :title="noticeContent.title"
      :visible.sync="noticeContent.dialogVisible"
      width="30%">
      <div>发布时间：{{ noticeContent.createTime | formatDate('YYYY-MM-DD HH:mm:ss') }}</div>
      <hr/>
      <div>
        <div v-html="noticeContent.content" style="height: 400px ;overflow-y:auto;overflow-x:hidden;"></div>
      </div>
    </el-dialog>
    <el-dialog
      title="推广行为守则"
      :visible.sync="firstNotice"
      width="50%">
      <div>
        <div style="height: 500px ;overflow-y:auto;overflow-x:hidden;">
          <h1>支点游戏平台合作规则</h1>
          <h3>前言</h3>
          <strong>为维护合作渠道的利益，减少同行恶性竞争，保障平台各推广商的稳定发展，本平台拟定了本规则，望各渠道恪守本规，实现合作共赢。</strong><br/>

          <div v-html="firstNoticeContent.content"></div>
          </div>
      </div>
    </el-dialog>
    <el-row :gutter="20">
      <el-col :xs="24" :sm="24" :md="16" :lg="16" :xl="16">
        <div class="box-sconed">
          <div style="padding:20px;">
            <div>
              <div style="float: left;width: 210px">
                <el-radio-group v-model="tabPositionThird" @change="handleClickThird">
                  <el-radio-button label="1">今日开服</el-radio-button>
                  <el-radio-button label="2">开服预告</el-radio-button>
                </el-radio-group>
              </div>
              <div style="float: right;">
                <el-form :inline="true" :model="formInline" class="demo-form-inline">
                  <el-form-item label="游戏名称：">
                    <el-select clearable v-model="formInline.projectId" @change="getOpenGameServerListData" placeholder="全部">
                      <el-option
                        v-for="item in gameProjectList"
                        :key="item.id"
                        :label="item.name"
                        :value="item.id"/>
                    </el-select>
                  </el-form-item>
<!--                  <el-form-item>-->
<!--                    <el-button type="primary" @click="getOpenGameServerListData">查询</el-button>-->
<!--                    &lt;!&ndash;                <el-button type="primary" @click="luodiye">落地页</el-button>&ndash;&gt;-->

<!--                  </el-form-item>-->
                </el-form>
              </div>
            </div>


            <el-table
              :data="openGameServerList"
              border
              style="width: 100%">
              <el-table-column
                prop="icon"
                label="游戏图标"
                width="120">
                <template slot-scope="scope">
                  <el-popover placement="top-start" title="" trigger="hover">
                    <img :src="scope.row.icon" alt="" style="width: 150px;height: 150px">
                    <img slot="reference" :src="scope.row.icon" style="width: 60px;height: 60px">
                  </el-popover>
                </template>
              </el-table-column>
              <el-table-column
                prop="gameName"
                label="游戏"
                width="300">
              </el-table-column>
              <el-table-column
                prop="osTypeName"
                label="平台"
                width="300">
              </el-table-column>
              <el-table-column
                label="开服时间"
                width="300">
                <template slot-scope="scope">
                  <span>{{ scope.row.createTime  | formatDate('YYYY-MM-DD HH:mm:ss') }}</span>
                </template>
              </el-table-column>
              <el-table-column
                prop="serverName"
                label="服务器信息">
              </el-table-column>
            </el-table>

            <div class="block" style="margin-top: 20px;">
              <el-pagination
                background
                @size-change="handleSizeChange"
                @current-change="handleCurrentChange"
                :current-page="page.current"
                :page-sizes="[20, 50, 100, 200]"
                :page-size="page.size"
                layout="total, sizes, prev, pager, next, jumper"
                :total="page.total">
              </el-pagination>
            </div>

          </div>

        </div>

     </el-col>
      <el-col :xs="24" :sm="24" :md="8" :lg="8" :xl="8">
        <div class="box-sconed">
          <div style="padding:20px;">
            <div style="display: flex;justify-content: space-between">
              <el-radio-group v-model="tabPosition" style="margin-bottom: 10px;" @change="handleClick">
                <el-radio-button label="1">公告</el-radio-button>
                <el-radio-button label="2">消息</el-radio-button>
                <el-radio-button label="3">游戏活动</el-radio-button>
              </el-radio-group>
              <div class="box-sconed-text" @click="gotMessageList()">更多</div>
            </div>
            <div style="display: flex;justify-content: space-between; margin-bottom: 5px" v-for="(item,index) in promoteNoticeList"
                 :key="index" @click="showNoticeContent(item.id)">
              <div class="box-sconed-text">{{ item.title }}<span style="display: inline-block;
          padding: 2px 4px;color: #909399;margin-left: 5px;
          font-size: 8px;
           border: 1px solid #ccc; border-radius: 5px;" v-show="item.rdId != -1">已读</span></div>
              <div class="box-sconed-text">{{ item.createTime | formatDate('YYYY-MM-DD HH:mm:ss') }}</div>
            </div>
          </div>
        </div>
      </el-col>
    </el-row>
  </div>

  <div v-else-if ="userInfo.authority == 'qrcodepay' || userInfo.authority == 'qrcodePayCw'" style="height: 100%">
    <div style="height: 100%; width:100%; background-color: #FFFFFF;">

    </div>
  </div>
</template>

<script>
import {mapGetters} from "vuex";

import {getHomeDataSurvey} from "@/api/statistics/home";
import {gameList} from "@/api/game/game";
import {detail, promoteNoticePage} from "@/api/notice/notice";
import {prepareOpenGameServerList, todayOpenGameServerList} from "@/api/game/gameServer";
import {getLogo} from "@/api/system/user";
import webiste from "@/config/website";
import {getFirstNoticeContent} from "@/api/dept/notice";

export default {
  name: "wel",
  data() {

    return {
      page: {
        current: 1,
        size: 20,
        total: 0,
      },
      openGameServerList: [],
      noticeContent: {
        title: '',
        dialogVisible: false,
        content: '',
        createTime: '',
      },
      nowData: {
        registerUserCount: 0,
        totalCount: 0,
        todayUserRoleAccount: 0,
        loginAccount: 0,
      },
      yesterdayData: {
        registerUserCount: 0,
        totalCount: 0,
        yesterdayUserRoleAccount: 0,
        yesterdayLoginAccount: 0,
      },
      activeNames: ['1', '2', '3', '5'],
      logActiveNames: ['26'],
      tabPosition: '1',
      tabPositionThird: '1',
      formInline: {
        region: ''
      },
      promoteNoticeList: [],
      currentPage4: 1,
      gameProjectList: [],
      tableData: [],
      companyLogo:{},
      selTab:1,
      firstNotice:true,
      firstNoticeContent: '',
      firstNoticeMsg:''
    };
  },
  computed: {
    ...mapGetters(["userInfo"]),
  },
  created() {
    if(this.userInfo.authority == 'qrcodepay' || this.userInfo.authority == 'qrcodePayCw') {

    } else {
      this.getHomeDataSurveyData()
      this.game()
      promoteNoticePage(1, 1, 10).then(res => {
        let data = res.data.data;
        this.promoteNoticeList = data.records;
      })
      this.getOpenGameServerListData()


    }

    this.queryFirstNoticeContent()
    this.logo()
  },


  methods: {
    queryFirstNoticeContent(){
      getFirstNoticeContent().then(res => {
        let data = res.data.data;
        this.firstNoticeContent = data;
        console.log('getFirstNoticeContent',res)
      })
    },
    updateFavicon(iconUrl) {
      (function(iu) {
        var link = document.querySelector("link[rel*='icon']") || document.createElement('link');
        link.type = 'image/x-icon';
        link.rel = 'shortcut icon';
        link.href = iu;
        document.getElementsByTagName('head')[0].appendChild(link);
      })(iconUrl);
    },

    showNoticeContent(id) {
      detail(id).then(res => {
        let data = res.data.data;
        this.noticeContent.content = data.content
        this.noticeContent.title = data.title
        this.noticeContent.createTime = data.createTime
        this.noticeContent.dialogVisible = true

        promoteNoticePage(this.selTab, 1, 10).then(res => {
          let data = res.data.data;
          this.promoteNoticeList = data.records;
        })
      })

    },

    getOpenGameServerListData() {
      console.log("hihiihihiae")
      if (this.tabPositionThird === '1') {
        todayOpenGameServerList(this.page.current, this.page.size, {"projectId": this.formInline.projectId}).then(res => {
          let data = res.data.data;
          this.openGameServerList = data.records
          this.page.total = data.total
        })
      } else if (this.tabPositionThird === '2') {
        prepareOpenGameServerList(this.page.current, this.page.size, {"projectId": this.formInline.projectId}).then(res => {
          let data = res.data.data;
          this.openGameServerList = data.records
          this.page.total = data.total
        })
      }
    },
//    luodiye(){
//      this.$router.push({name: '落地页', path: '/game/landingPage', query: {id: ''}});
// },
    getHomeDataSurveyData() {
      getHomeDataSurvey().then(res => {
        const data = res.data.data
        this.nowData.totalCount = data.todayTotalPrice
        this.yesterdayData.totalCount = data.yesterdayTotalPrice

        this.nowData.registerUserCount = data.todayUserCount
        this.yesterdayData.registerUserCount = data.yesterdayUserCount

        this.nowData.todayUserRoleAccount = data.todayUserRoleAccount
        this.yesterdayData.yesterdayUserRoleAccount = data.yesterdayUserRoleAccount

        this.nowData.loginAccount = data.loginAccount
        this.yesterdayData.yesterdayLoginAccount = data.yesterdayLoginAccount
      })
    },

    game() {
      gameList().then(res => {
        const data = res.data.data;
        this.gameProjectList = data;
      });
    },

    handleChange(val) {
      console.log(val);
    },
    handleClick(tab, event) {
      this.selTab = tab
      console.log("111", tab, event);
      promoteNoticePage(tab, 1, 10).then(res => {
        let data = res.data.data;
        this.promoteNoticeList = data.records;
      })
    },
    handleClickThird(tab, event) {
      this.selTab = tab
      console.log("222", tab, event);
      this.page = {
        current: 1,
        size: 20,
        total: 0,
      }
      this.getOpenGameServerListData()
    },
    gotMessageList() {
      this.$router.push({name: '公告列表', path: '/message/index'});
    },
    handleSizeChange(val) {
      console.log(`每页 ${val} 条`);
      this.page.size = val
    },
    handleCurrentChange(val) {
      console.log(`当前页: ${val}`);
      this.page.current = val
    },
    app(row) {
      return row.name + 'i' + row.province
    },
    logo(){
      getLogo().then(res => {
      console.log("res.data.data",res.data.data)
        this.companyLogo = res.data.data;
        if(this.companyLogo.logo == undefined) {
          this.$store.commit("SET_LOGOURL", "https://ylhy-sdk.oss-cn-beijing.aliyuncs.com/hp/%E5%90%9B%E5%AD%90%E4%BA%92%E5%A8%B1%E5%90%8E%E5%8F%B0logo-01.png");
        } else {
          this.$store.commit("SET_LOGOURL", this.companyLogo.logo);
        }
        // website.logoUrl=this.companyLogo.logo
        this.$store.commit("SET_ICONURL", this.companyLogo.icon);
        this.updateFavicon(this.companyLogo.icon);
      })
    },
  }
};
</script>

<style scoped lang="scss">
.el-divider--horizontal {
  margin: 12px 0 !important;
}

.el-font-size {
  font-size: 14px;
}

.container {
  padding: 30px;
}

.card-panel {
  min-height: 156px;
  cursor: pointer;
  font-size: 12px;
  position: relative;
  overflow: hidden;
  color: #666;
  background: #FFFFFF;
   display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 35px 40px;

}

.box-enroll {
  padding: 14px 20px;
  display: flex;
  justify-content: space-between;

}

.box-enroll-img {

  width: 80px;
  height: 80px;
  border-radius: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
}
.box-enroll-imgtwo {

  width: 80px;
  height: 80px;
  border-radius: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
}
.box-enroll-img-img {
  width: 68px;
  height: 68px;
  background-image: url('../../assets/icons/yonghu.png');
}
.box-enroll-imgtwo-img {
  width: 68px;
  height: 68px;
  background-image: url('../../assets/icons/money.png');
}
//.card-panel:hover {
//  .box-enroll-img {
//    background-color:#40c9c6;
//  }
//  .box-enroll-imgtwo {
//    background: #F4516C;
//  }
//  .box-enroll-img-img {
//    background-image: url('../../assets/icons/yonghu2.png');
//  }
//  .box-enroll-imgtwo-img {
//    background-image: url('../../assets/icons/money2.png');
//  }
//}

.box-enroll-text {
  width: 122px;
  margin: 10px 0px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.box-enroll-text-text {
  color: rgba(0, 0, 0, .45);
  font-size: 16px;

  &.much {
    font-size: 20px;
    font-weight: 700;
  }
}

.box-sconed {
  margin-top: 12px;
  background-color: #FFFFFF;
  width: 100%;
}

.box-sconed-text {
  cursor: pointer;
  font-weight: 500;
  font-size: 14px;
  color: #1e9fff;
}

element.style {
  margin-bottom: 10px;
  border-bottom: 1px solid #EBEEF5 !important;
}
</style>

